<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="root">
      <p>{{name}}</p>
      <p>{{message}}</p>
    </div>

    <script>
      // 1.拿到模板
      let tmpNode = document.querySelector("root");
      //   2.拿到数据
      let data = {
        name: "张三",
        message: "哈哈哈"
      };
      // 3.将数据放到模板中
      function compiler(template, data) {}
    </script>
  </body>
</html>
